<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>推广管理系统</title>
    <link rel="stylesheet" href="__PUBLIC__/admin/vendor/simple-line-icons/css/simple-line-icons.css">
    <link rel="stylesheet" href="__PUBLIC__/admin/vendor/font-awesome/css/fontawesome-all.min.css">
    <link rel="stylesheet" href="__PUBLIC__/admin/css/styles.css">
    <link rel="stylesheet" href="__PUBLIC__/admin/css/index.css">
    <link rel="stylesheet" href="__PUBLIC__/admin/css/bootstrap.css">
    <link rel="icon" href="__PUBLIC__/admin/src/imgs/icon.jpg" type="img/x-ico" />
    <script src="__PUBLIC__/admin/vendor/jquery/jquery.min.js"></script>
    <script src="__PUBLIC__/admin/vendor/popper.js/popper.min.js"></script>
    <script src="__PUBLIC__/admin/vendor/bootstrap/js/bootstrap.min.js"></script>
    <script src="__PUBLIC__/admin/vendor/chart.js/chart.min.js"></script>
    <script src="__PUBLIC__/admin/js/carbon.js"></script>
</head>
<body class="sidebar-fixed header-fixed" >
<div class="page-wrapper">
    <nav class="navbar page-header">
        <a href="#" class="btn btn-link sidebar-mobile-toggle d-md-none mr-auto">
            <i class="fa fa-bars"></i>
        </a>

        <a class="navbar-brand" href="#">
            <img src="__PUBLIC__/admin/imgs/logo.png" alt="logo">
        </a>

        <a href="#" class="btn btn-link sidebar-toggle d-md-down-none">
            <i class="fa fa-bars"></i>
        </a>
        <ul class="top-nav">
            <li class="active">
                <a href="{:U('/Agent/Index/index')}">控制台</a>
            </li>
            <li>
                <a href="{:U('/Agent/Index/ptindex')}">官网推（SEO)</a>
            </li>
            <li>
                 <a href="#">软文推</a>
            </li>
            <li>
                <a href="#">百度问答</a>
            </li>
        </ul>
        <ul class="navbar-nav ml-auto">
            <li class="nav-item d-md-down-none" id="ms">
                <a href="#">
                    <i class="fa fa-bell"></i>
                    <span class="badge badge-pill badge-danger" >{$me}</span>
                </a>
            </li>

            <li class="nav-item d-md-down-none"  id="ds">
                <a href="#">
                    <i class="fa fa-envelope-open"></i>
                    <span class="badge badge-pill badge-danger" id="counts">{$count}</span>
                </a>
            </li>

            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    <img src="{$_SESSION['agentInfo']['logo']}" class="avatar avatar-sm" alt="logo">
                    <span class="small ml-1 d-md-down-none">{$_SESSION["agentInfo"]['user_name']}</span>
                </a>
                <div class="dropdown-menu dropdown-menu-right">
                    <div class="dropdown-header">Account</div>
                     <a href="#" class="dropdown-item">
                        <i class="glyphicon glyphicon-usd"></i> {$_SESSION["agentInfo"]['money']}
                    </a> 
                    <a href="{:U('/Agent/Login/Logout')}" class="dropdown-item">
                        <i class="fa fa-lock"></i> 退出
                    </a>
                </div>
            </li>
        </ul>
        <div style="position:absolute;width:600px; background-color: #FFFFFF;margin-left: 80%;margin-top: 2.2%;display: none" id="me">
               <li style="list-style-type :none;">您已欠费，请及时续费！</li>
            </div>
        <div style="position:absolute;width:400px; background-color: #FFFFFF;margin-left: 85%;margin-top: 2.2%;display: none" id="desc">
                <volist name="desc" id="v">
                    <li style="list-style-type :none;">{$v}</li>
                </volist>
            </div>
    </nav>

    <div class="main-container">
        <div class="sidebar">
            <nav class="sidebar-nav">
                <ul class="nav">
                    <li class="nav-title">Navigation</li>

                    <li class="nav-item">
                        <a href="{:U('/Agent/Index/index')}" class="nav-link active">
                            <i class="icon icon-speedometer"></i> 系统概述
                        </a>
                    </li>

                    <li class="nav-item nav-dropdown" id="Agent">
                        <a href="#" class="nav-link nav-dropdown-toggle">
                            <i class="fa fa-caret-right" ></i> 客户管理 <i class=""></i>
                        </a>

                        <ul class="nav-dropdown-items">
                            <li class="nav-item">
                                <a href="{:U('/Agent/Agent/index')}" class="nav-link">
                                    <i class="icon icon-target"></i> 客户列表
                                </a>
                            </li>
                        </ul>
                    </li>


                    <li class="nav-item nav-dropdown" id="Business">
                        <a href="#" class="nav-link nav-dropdown-toggle">
                            <i class="fa fa-caret-right" ></i> 商务管理 <i class=""></i>
                        </a>

                        <ul class="nav-dropdown-items">
                            <li class="nav-item">
                                <a href="{:U('/Agent/Business/index')}" class="nav-link">
                                    <i class="icon icon-target"></i> 商务列表
                                </a>
                            </li>

                        </ul>
                    </li>


                    <li class="nav-item nav-dropdown" id="Financial">
                        <a href="#" class="nav-link nav-dropdown-toggle">
                            <i class="fa fa-caret-right" ></i> 财务管理 <i class=""></i>
                        </a>

                        <ul class="nav-dropdown-items">
                            <li class="nav-item">
                                <a href="{:U('/Agent/Financial/customer',array('type'=>1))}" class="nav-link">
                                    <i class="icon icon-target"></i> 入账纪录
                                </a>
                            </li>

                            <li class="nav-item">
                                <a href="{:U('/Agent/Financial/customer',array('type'=>2))}" class="nav-link">
                                    <i class="icon icon-target"></i> 消费记录
                                </a>
                            </li>

                            <li class="nav-item">
                                <a href="{:U('/Agent/Financial/charge')}" class="nav-link">
                                    <i class="icon icon-target"></i> 充值管理
                                </a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </nav>
        </div>
<script type="text/javascript">
    $(document).ready(function () {
        var counts = $('#counts').html();
        if(parseInt(counts) > 0){
            $('#ds').hover(function() {
                // 鼠标移入时添加hover类
                $('#desc').css('display','block')
            }, function() {
                // 鼠标移出时移出hover类
                $('#desc').css('display','none')
            });
        }

        var me  = '{$me}';
        console.log(me);
        if(parseInt(me) > 0){
            $('#ms').hover(function() {
                // 鼠标移入时添加hover类
                $('#me').css('display','block')
            }, function() {
                // 鼠标移出时移出hover类
                $('#me').css('display','none')
            });
        }
    });
    var navs = '{$navs}';
    if(navs != ''){
        $('#'+navs).addClass('open');
    }
    var url = window.location.pathname;
    console.log(url);
    if(url.toLowerCase() != '/index.php/agent/index/index.html' && url.toLowerCase() != '/index.php/agent/index/ptindex.html'){
        $('a[href="'+url+'"]').css('color','#fff');
    }    

</script>